package com.wm.wmim.common.enums;

import com.wm.wmim.common.constant.HttpStatusConstant;
import lombok.Getter;
import org.springframework.http.HttpStatus;


@Getter
public enum CommonBizCodeEnum implements BizCodeEnum{

    /**
     * 业务操作成功
     */
    SUCCESS("000000", "success", HttpStatus.OK.value()),

    /**
     * 公共错误码
     */
    PARAM_ERROR("100001", "客户端参数错误，param:%s", HttpStatus.BAD_REQUEST.value()),
    ERROR_UNKNOWN("100002", "系统繁忙，请稍后再试", HttpStatus.INTERNAL_SERVER_ERROR.value()),

    LOGIN_USER_NOT_EXIST("200001", "用户名不存在!", HttpStatus.UNAUTHORIZED.value()),
    LOGIN_PASSWORD_ERROR("200002", "密码错误!", HttpStatus.UNAUTHORIZED.value()),

    USER_NOT_EXIST("200003", "用户不存在!", HttpStatus.NOT_FOUND.value());
    private String code;
    private String msg;
    private Integer httpStatus;

    CommonBizCodeEnum(String code, String msg, Integer httpStatus) {
        this.code = code;
        this.msg = msg;
        this.httpStatus = httpStatus;
    }
}


